BEGIN;
ALTER TABLE duty.onDutyDef ADD COLUMN flexStartTime TIME;
UPDATE duty.onDutyDef SET flexStartTime=TIME '09:30:00' WHERE NAME='普通班';

--UPDATE DUTY.DUTYRECORDS SET late=true WHERE signIntime > (SELECT flexStartTime FROM duty.onDutyDef WHERE NAME='普通班');
--UPDATE DUTY.DUTYRECORDS SET leaveearly=true WHERE signOuttime < (SELECT endTime FROM duty.onDutyDef WHERE NAME='普通班');
COMMIT;